﻿@using HOPU.Models
@model LoginViewModel
@{
    ViewBag.Title = "登录";
}
<h2>@ViewBag.Title</h2>
<div class="row">
    <div class="col-md-8">
        <section id="loginForm">
            @using (Html.BeginForm("AdminLogin", "SysAdmin", new { ReturnUrl = ViewBag.ReturnUrl }, FormMethod.Post, new { @class = "form-horizontal", role = "form" }))
            {
                @Html.AntiForgeryToken()
                <hr />
                @Html.ValidationSummary(true, "", new { @class = "text-danger" })
                <div class="form-group">
                    @Html.LabelFor(m => m.UserName, new { @class = "col-md-2 control-label" })
                    <div class="col-md-10">
                        <div class="d-flex align-items-start bg-white">
                            @Html.TextBoxFor(m => m.UserName, new { @class = "form-control", @placeholder = "学号" })
                            <div class="p-2 ">
                                @Html.ValidationMessageFor(m => m.UserName, "", new { @class = "text-danger" })
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    @Html.LabelFor(m => m.Password, new { @class = "col-md-2 control-label" })
                    <div class="col-md-10">
                        <div class="d-flex align-items-start bg-white">
                            @Html.PasswordFor(m => m.Password, new { @class = "form-control" })
                            <div class="p-2 ">
                                @Html.ValidationMessageFor(m => m.Password, "", new { @class = "text-danger" })
                            </div>
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <div class="checkbox">
                            @Html.CheckBoxFor(m => m.RememberMe)
                            @Html.LabelFor(m => m.RememberMe)
                        </div>
                    </div>
                </div>
                <div class="form-group">
                    <div class="col-md-offset-2 col-md-10">
                        <input type="submit" value="登录" class="btn btn-success" />
                    </div>
                </div>
                <p>
                    @Html.ActionLink("没有账号？点我注册->", "AdminRegister")
                </p>
                @* 在为密码重置功能启用帐户确认后启用此项
                    <p>
                        @Html.ActionLink("忘记了密码?", "ForgotPassword")
                    </p>*@
            }
        </section>
    </div>
    <div class="col-md-4">
        <section id="socialLoginForm">
            @*@Html.Partial("_ExternalLoginsListPartial", new ExternalLoginListViewModel { ReturnUrl = ViewBag.ReturnUrl })*@
        </section>
    </div>
</div>
@section Scripts {
    @Scripts.Render("~/bundles/jqueryval")
}